<template id="invitation_code">
	<div class="invitation_code">

		<!--头部-->
		<div class="about_header">

			<div class="about_title">
				<router-link to="/main"><img src="../../assets/images/class/jiantou_03.png" /></router-link>

				<p>绑定邀请码</p>
				<div class="about_select">
					<div class="about_ing"></div>

				</div>

			</div>
		</div>
		<!--头部结束-->

		<div class="invitation_funny">
			<!--请输入邀请码-->
			<div class="invitation_self">

				<div class="invitation_come">
					<div class="invitation_top">
						<p>您的邀请码是:</p>
						<span>{{invite.myInvitecode}}</span>
					</div>
					<div class="invitation_bottom">
						<p>已有</p><span>{{invite.bindcount}}</span>
						<p>人绑定了您的邀请码</p>
					</div>
				</div>

				<div class="invitation_ipt" >
					<input type="number" name="" id="" value=""  oninput="if(value.length > 1)value = value.slice(0, 1)" v-focus="true"/>
					<input type="number" name="" id="" value="" oninput="if(value.length > 1)value = value.slice(0, 1)" v-focus="true"/>
					<input type="number" name="" id="" value="" oninput="if(value.length > 1)value = value.slice(0, 1)" v-focus="true"/>
					<input type="number" name="" id="" value="" oninput="if(value.length > 1)value = value.slice(0, 1)" v-focus="true"/>
					<input type="number" name="" id="" value="" oninput="if(value.length > 1)value = value.slice(0, 1)" v-focus="true"/>
					<input type="number" name="" id="" value="" oninput="if(value.length > 1)value = value.slice(0, 1)" v-focus="true"/>
				</div>
        <!--支付密码设置  https://www.cnblogs.com/cjh1111/p/6971801.html -->

				<div class="invitation_num">请输入6位邀请码</div>

				<div class="invitation_gray">
					<p>每个账号只能绑定一个邀请码</p>
					<p>邀请码绑定后不可以解除绑定</p>
				</div>

				<!--请输入邀请码结束-->
			</div>

			<div class="invitation_submit">提交绑定</div>

		</div>

	</div>

</template>

<script>
	export default {
		data() {
			return {
				invite: [],
			}
		},
    directives: {

      focus: {

        inserted: function (el, {value}) {

          console.log(el,{value})

          if (value) {

            el.focus();

          }

        }

      }

    },
		computed: {

		},
		created() {
			let obj = {
				//请求的参数
				icode: 666666,
				userid: 106720

			};
			let _this = this
			let qs = require('qs');
			this.$axios.post("http://yogahome.top/yujia/user/showBindInviteCode", qs.stringify(obj), {
				headers: {
					'Content-Type': 'application/x-www-form-urlencoded'
				}

			}).then(function(response) {

				_this.invite = response.data.data

			}).catch(function(error) {
				console.log(error);
			});
		},

		methods: {
			submit() {

			},


		},
    watch:{

    }
	}
</script>

<style scoped>
	@import "../../assets/css/invitation_code.css";
  #payPwd .pwd-wrap{
    width: 90%;
    height: 44px;
    padding-bottom: 1px;
    margin: 0 auto;
    background: #fff;
    border:1px solid #ddd;
    display: flex;
    display: -webkit-box;
    display: -webkit-flex;
    cursor: pointer;
  }
  .pwd-wrap li{
    list-style-type:none;
    text-align: center;
    line-height: 44px;
    -webkit-box-flex: 1;
    flex: 1;
    -webkit-flex: 1;
    border-right:1px solid #ddd ;
  }
  .pwd-wrap li:last-child{
    border-right: 0;
  }
  .pwd-wrap li i{
    height: 10px;
    width: 10px;
    border-radius:50% ;
    background: #000;
    display: inline-block;
  }
</style>
